package org.bot.api.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author 沧月
 * @create 0014 2023/10/14 20:08
 * @description <description class purpose>
 */
public class StringUtil {

    public static boolean isNull(String str) {
        return str == null || str.isEmpty();
    }

    public static boolean isNotNull(String str) {
        return !isNull(str);
    }

    public static String getTime() {
        LocalDateTime now = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return now.format(formatter);
    }
}
